spec/lib/railsthemes/utils_spec.rb in railsthemes-1.1 vs spec/lib/railsthemes/utils_spec.rb in railsthemes-1.1.1
- old
+ new
@@ -48,9 +48,20 @@
gemfile = using_gems
Railsthemes::Utils.get_primary_configuration(gemfile).should == ['erb', 'css']
end
end
+ describe 'add_gem_to_gemfile' do
+ it 'should add the gem to the Gemfile' do
+ Railsthemes::Utils.add_gem_to_gemfile 'test'
+ Railsthemes::Utils.add_gem_to_gemfile 'test'
+ lines = File.open('Gemfile').readlines.map(&:strip)
+ lines.count.should == 2
+ lines[0].should == "gem 'test'"
+ lines[1].should == "gem 'test'"
+ end
+ end
+
describe 'download' do
it 'should log and abort if file not found at url' do
FakeWeb.register_uri :get,
'http://example.com/something',
:body => 'some random stuff', :status => ['404', 'Not Found']