Sha256: b0b46d1ed319a901535ca5cad59af38085699a39cde089815fbad0bafcab3642

Contents?: true

Size: 748 Bytes

Versions: 2

Compression:

Stored size: 748 Bytes

Contents

require "test/helper"
require "test/fixtures/shoulda_macros/thing"

module TestBelt::ShouldaMacros
  class ContextTest < Test::Unit::TestCase

    context "TestBelt Shoulda Macros for context" do
      setup do
        @thing = Thing.new
      end

      context "callbacks that setup/teardown each test" do
        before do
          @thing.accessor1 = "before"
        end
        after do
          assert_equal 'after', @thing.accessor1, "the accessor was not set correctly in the after block"
        end

        should "run using before/after blocks" do
          assert_equal 'before', @thing.accessor1, "the accessor was not set correctly in the before block"
          @thing.accessor1 = "after"
        end
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
test-belt-0.2.1 test/shoulda_macros/context_test.rb
test-belt-0.2.0 test/shoulda_macros/context_test.rb