Sha256: 019f5bf55cd78f46b3b80a0dc88f1e99f34ec4a43235f46bf4f23acd70ee78c4

Contents?: true

Size: 717 Bytes

Versions: 6

Compression:

Stored size: 717 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))

given "we set an ivar" do
  @foo = 7
end

given "we set another ivar" do
  @pi = 3.14
end

describe "a spec that reuses a given block", :given => "we set an ivar" do
  it "sees the results of the given block" do
    @foo.should == 7
  end
end

describe "a spec that reuses many given blocks", :given => ["we set an ivar", "we set another ivar"] do
  it "sees the results of the first given block" do
    @foo.should == 7
  end

  it "sees the results of the second given block" do
    @pi.should == 3.14
  end
end

describe "a spec that does not reuse a given block" do
  it "does not see the given block" do
    @foo.should == nil
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
merb-core-1.1.3 spec/public/test/rspec_ext_spec.rb
merb-core-1.1.2 spec/public/test/rspec_ext_spec.rb
merb-core-1.1.1 spec/public/test/rspec_ext_spec.rb
merb-core-1.1.0 spec/public/test/rspec_ext_spec.rb
merb-core-1.1.0.rc1 spec/public/test/rspec_ext_spec.rb
merb-core-1.1.0.pre spec/public/test/rspec_ext_spec.rb