Sha256: 93c806ceac19fc7f72ae026e3b2656b55193c31a8cadc5b375c4450d0cc19c78

Contents?: true

Size: 689 Bytes

Versions: 4

Compression:

Stored size: 689 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'
require 'shoulda'

class ShouldaTest < Test::Unit::TestCase
  def setup
    Zebra.stubs(:shoulda?).returns(true)
  end

  should "create a test" do
    self.class.expect { 2.to == 1 }
    assert self.respond_to?("test: Shoulda expect (2.to == 1)"), self.class.instance_methods.grep(/test/).inspect
  end

  context "in a context" do
    expect { true }
    should "grab the name of the context" do
      assert self.respond_to?("test: in a context expect true"), self.class.instance_methods.grep(/test/).inspect
    end
  end

  context "A context with no expects" do
    should "not raise any exceptions" do
      true
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
giraffesoft-zebra-0.1.0 test/shoulda/shoulda_test.rb
giraffesoft-zebra-0.2.0 test/shoulda/shoulda_test.rb
joshng-zebra-0.1.1 test/shoulda/shoulda_test.rb
joshng-zebra-0.1.2 test/shoulda/shoulda_test.rb