Sha256: 163057b333517bb5f31915ddbaa605706d06cf53de6492d4cb8fbc72a8821bcd

Contents?: true

Size: 977 Bytes

Versions: 57

Compression:

Stored size: 977 Bytes

Contents

$:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
require 'spec'
# TODO - this should not be necessary, ay?
require 'spec/interop/test'

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

57 entries across 57 versions & 10 rubygems

Version Path
dchelimsky-rspec-1.1.10 stories/resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.11.1 stories/resources/test/spec_and_test_together.rb
dchelimsky-rspec-1.1.11 stories/resources/test/spec_and_test_together.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/stories/resources/test/spec_and_test_together.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/stories/resources/test/spec_and_test_together.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/stories/resources/test/spec_and_test_together.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/stories/resources/test/spec_and_test_together.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/stories/resources/test/spec_and_test_together.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/stories/resources/test/spec_and_test_together.rb
mack-0.8.2 lib/gems/rspec-1.1.11/stories/resources/test/spec_and_test_together.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/stories/resources/test/spec_and_test_together.rb
picolena-0.1.0 rails_plugins/rspec/stories/resources/test/spec_and_test_together.rb
picolena-0.1.1 rails_plugins/rspec/stories/resources/test/spec_and_test_together.rb
picolena-0.1.2 rails_plugins/rspec/stories/resources/test/spec_and_test_together.rb
picolena-0.1.4 rails_plugins/rspec/stories/resources/test/spec_and_test_together.rb
picolena-0.1.3 rails_plugins/rspec/stories/resources/test/spec_and_test_together.rb