Skip to content

Commit

Permalink
Add specs for #1532.
Browse files Browse the repository at this point in the history
  • Loading branch information
ugisozols committed May 23, 2012
1 parent b7555e1 commit 6c9ef07
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/spec/lib/generators/refinery/engine/engine_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,20 @@ module Refinery
end
}
end

context "when generating extension inside existing extensions dir" do
before do
Refinery::EngineGenerator.any_instance.stub(:merge_locales!).and_return(true)
Refinery::EngineGenerator.any_instance.stub(:existing_extension?).and_return(true)

run_generator %w{ rspec_item_test title:string --extension rspec_product_tests --skip }
end

it "appends existing seeds file" do
File.open("#{destination_root}/vendor/extensions/rspec_product_tests/db/seeds.rb") do |file|
file.grep(%r{/rspec_product_tests|/rspec_item_tests}).count.should eq(2)
end
end
end
end
end

0 comments on commit 6c9ef07

Please sign in to comment.