Sha256: a02abf0d60d484302fb6404c248a56b0425611756fe23f9bbfa9c101760a3894
Contents?: true
Size: 989 Bytes
Versions: 3
Compression:
Stored size: 989 Bytes
Contents
require 'spec_helper' RSpec::Generator::Require.root_dir = 'generator_spec/fixtures' require_generator :model describe 'model_generator' do use_orm :mongoid before :each do setup_generator 'model_generator' do tests ModelGenerator end remove_models :account, :person end after :each do remove_models :account, :person end it "should not work without an Account model file" do with_generator do |g| g.run_generator :account.args g.should_not generate_models :account, :person end end it "should decorate an existing Account model file with include Canable:Ables" do create_model :account create_model :person with_generator do |g| g.run_generator :account.args g.run_generator :person.args g.should generate_artifacts :model, :account, :person g.should generate_models :account, :person end end end
Version data entries
3 entries across 3 versions & 1 rubygems