Sha256: a04ba3f31eddc4ff1813765fdc2c96087dbb4fbadde5c569c5173f4e24f1cca7
Contents?: true
Size: 1.74 KB
Versions: 4
Compression:
Stored size: 1.74 KB
Contents
require File.expand_path(File.dirname(__FILE__) + "/../../example_helper") describe Micronaut::Example, :parent_metadata => 'sample' do before do behaviour = stub('behaviour', :metadata => { :behaviour => { :name => 'behaviour_name' }}) @example = Micronaut::Example.new(behaviour, 'description', {}, (lambda {})) end describe "attr readers" do it "should have one for the parent behaviour" do @example.should respond_to(:behaviour) end it "should have one for it's description" do @example.should respond_to(:description) end it "should have one for it's metadata" do @example.should respond_to(:metadata) end it "should have one for it's block" do @example.should respond_to(:example_block) end end describe '#inspect' do it "should return 'behaviour_name - description'" do @example.inspect.should == 'behaviour_name - description' end end describe '#to_s' do it "should return #inspect" do @example.to_s.should == @example.inspect end end describe "accessing metadata within a running example" do it "should have a reference to itself when running" do running_example.description.should == "should have a reference to itself when running" end it "should be able to access the behaviours top level metadata as if it were its own" do running_example.behaviour.metadata.should include(:parent_metadata => 'sample') running_example.metadata.should include(:parent_metadata => 'sample') end end describe "#run" do pending "should run after(:each) when the example fails" pending "should run after(:each) when the example raises an Exception" end end
Version data entries
4 entries across 4 versions & 1 rubygems