spec/support/generators_shared_examples.rb in statesman-0.7.0 vs spec/support/generators_shared_examples.rb in statesman-0.8.0
- old
+ new
@@ -4,23 +4,23 @@
TMP_GENERATOR_PATH = File.expand_path('../generator-tmp', __FILE__)
shared_examples 'a generator' do
destination TMP_GENERATOR_PATH
before { prepare_destination }
- let(:gen) { generator %w[Yummy::Bacon Yummy::BaconTransition] }
+ let(:gen) { generator %w(Yummy::Bacon Yummy::BaconTransition) }
it 'invokes create_model_file method' do
expect(gen).to receive(:create_model_file)
capture(:stdout) { gen.invoke_all }
end
describe 'it runs the generator and check things out' do
- before { run_generator %w[Yummy::Bacon Yummy::BaconTransition] }
+ before { run_generator %w(Yummy::Bacon Yummy::BaconTransition) }
describe 'it generates a correctly named file' do
subject { file(migration_name) }
- it { should be_a_migration }
+ it { is_expected.to be_a_migration }
end
end
end