rosa-build/spec/models/platform_spec.rb

27 lines
632 B
Ruby
Raw Normal View History

2011-03-09 17:38:21 +00:00
require 'spec_helper'
describe Platform do
2011-03-17 14:47:16 +00:00
before(:each) do
stub_rsync_methods
2011-03-17 14:47:16 +00:00
Platform.delete_all
FileUtils.rm_rf(APP_CONFIG['root_path'])
end
context 'released' do
it 'should add suffix to name when released' do
@platform = Factory(:platform)
old_name = @platform.name
@platform.released = true
@platform.save
@platform.name.should == "#{old_name} #{I18n.t("layout.platforms.released_suffix")}"
end
it 'should not add suffix to name when not released' do
@platform = Factory(:platform, :name => 'name')
@platform.name.should == 'name'
end
end
2011-03-09 17:38:21 +00:00
end