spec/lib/generators/relation_generator_spec.rb in rom-rails-0.3.3 vs spec/lib/generators/relation_generator_spec.rb in rom-rails-0.4.0

- old
+ new

@@ -17,11 +17,11 @@ directory 'app' do directory 'relations' do file 'users_relation.rb' do contains <<-CONTENT.strip_heredoc class UsersRelation < ROM::Relation[:#{default_adapter}] - # repository :default + # gateway :default dataset :users register_as :users @@ -43,14 +43,14 @@ relation = File.read(File.join(destination_root, 'app', 'relations', 'users_relation.rb')) expect(relation).to include("class UsersRelation < ROM::Relation[:memory]") end - specify "with given repository" do - run_generator ['users', '--repository=remote'] + specify "with given gateway" do + run_generator ['users', '--gateway=remote'] relation = File.read(File.join(destination_root, 'app', 'relations', 'users_relation.rb')) - expect(relation).to include("repository :remote") + expect(relation).to include("gateway :remote") end specify "with given registration" do run_generator ['users', '--register=profiles']