Sha256: 6ec391bc0b6de83b0c63e29bed7284b5b9d84c3f9876bcc40fce15eb1b6e5d45

Contents?: true

Size: 1.03 KB

Versions: 17

Compression:

Stored size: 1.03 KB

Contents

require 'spec_helper'

describe 'model without orm' do
  use_orm :none
  use_helper :model

  before :each do  
    Rails3::Assist::Directory.rails_root = fixtures_dir
  end

  after :each do              
    # remove_model :account
  end

  describe '#remove_artifact' do
    before :each do  
      create_artifact :person, :type => :model do
        '# Hello'
      end      
    end    
    
    it "should remove artifact" do
      has_model?(:person).should be_true
      remove_artifact :person, :type => :model
      has_model?(:person).should be_false
    end
  end

  describe '#remove_artifacts' do
    before :each do  
      create_artifact :person, :type => :model do
        '# Hello'
      end      
      create_artifact :user, :type => :model do
        '# Hi'
      end            
    end    

    it "should delete model artifacts :person and :user" do

      has_models?(:user, :person).should be_true

      remove_artifacts :person, :user, :type => :model

      has_models?(:person, :user).should be_false
    end    
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rails3_artifactor-0.4.0 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.3.2 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.3.1 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.3.0 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.2.8 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.2.7 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.2.6 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.2.5 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.2.4 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.2.3 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.2.2 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.2.1 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.1.5 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.1.4 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.1.3 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.1.2 spec/rails3_artifactor/base/crud/delete_spec.rb
rails3_artifactor-0.1.1 spec/rails3_artifactor/base/crud/delete_spec.rb