Sha256: 8f76bc3ded4771d386e4cbb326f340b754d8538ac041290bf8cdc68dd79d47cd

Contents?: true

Size: 936 Bytes

Versions: 13

Compression:

Stored size: 936 Bytes

Contents

$:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
require 'spec/autorun'
require 'spec/test/unit'

describe "An Example" do
  it "should pass with assert" do
    assert true
  end

  it "should fail with assert" do
    assert false
  end

  it "should pass with should" do
    1.should == 1
  end

  it "should fail with should" do
    1.should == 2
  end
end

class ATest < Test::Unit::TestCase
  def test_should_pass_with_assert
    assert true
  end
  
  def test_should_fail_with_assert
    assert false
  end

  def test_should_pass_with_should
    1.should == 1
  end
  
  def test_should_fail_with_should
    1.should == 2
  end

  def setup
    @from_setup ||= 3
    @from_setup += 1
  end

  def test_should_fail_with_setup_method_variable
    @from_setup.should == 40
  end

  before do
    @from_before = @from_setup + 1
  end

  def test_should_fail_with_before_block_variable
    @from_before.should == 50
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
dchelimsky-rspec-1.1.99.1 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.13 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.2 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.3 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.4 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.5 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.6 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.7 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.8 resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.99.9 resources/test/spec_and_test_together.rb
rspec-1.2.2 resources/test/spec_and_test_together.rb
rspec-1.2.1 resources/test/spec_and_test_together.rb
rspec-1.2.0 resources/test/spec_and_test_together.rb