Sha256: 6e7cdab91e974e562b96f7e4696dc2800a3ca3026fe104d21a9007fcca15a6fc

Contents?: true

Size: 555 Bytes

Versions: 10

Compression:

Stored size: 555 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe DattsRight, ".remove_definitions(array)" do
  before do
    reset_database
  end
  
  it "should add a definition to the existing definition" do
    c = Category.create
    c.should_receive(:remove_definition).with(:robot)
    c.should_receive(:remove_definition).with(:another)
    c.remove_definitions(:robot, :another)
  end

  it "should not explode if nil is passed" do
    lambda {Category.create.remove_definitions(nil)}.should_not raise_error(NoMethodError)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
datts_right-0.0.32 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.31 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.30 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.29 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.28 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.27 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.26 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.25 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.24 spec/datts_right/remove_definitions_spec.rb
datts_right-0.0.23 spec/datts_right/remove_definitions_spec.rb