Sha256: 01e84e768c719d8fdc456d27e71bd5f8e5baf6dc0ff987ce4e06470a091cc53c

Contents?: true

Size: 483 Bytes

Versions: 1

Compression:

Stored size: 483 Bytes

Contents

shared_examples_for "a context" do

  it "should take an object and expose that object through a reader" do
    obj = double('some data object')
    context = @class.new(obj)
    context.object.should eql(obj)
  end
  
  it "should raise an error if no target is provided at initialization" do
    @class.send(:instance_variable_set, :@default_class, nil)
    lambda{@class.new}.should raise_error(ArgumentError, /You must provide a target object to build this context./)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fathom-0.5.0 spec/support/context_behavior.rb