Sha256: 60caae180d99d32b05bb9c93743ce08a00ce7207ef36ee5898006cbec6a897bf

Contents?: true

Size: 527 Bytes

Versions: 27

Compression:

Stored size: 527 Bytes

Contents

module RSpec
  module Core
    class ExampleGroup
      module BlockAliases
        alias_method :to,     :should
        alias_method :to_not, :should_not
      end

      # Extends the submitted block with aliases to and to_not
      # for should and should_not. Allows expectations like this:
      #
      #   expect { this_block }.to change{this.expression}.from(old_value).to(new_value)
      #   expect { this_block }.to raise_error
      def expect(&block)
        block.extend BlockAliases
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
rspec-expectations-2.0.1 lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.3.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.1.2 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.1.1 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.1.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
gemrage-0.0.0 vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb
rspec-expectations-2.0.0 lib/rspec/expectations/extensions/rspec/core/example_group.rb
rspec-expectations-2.0.0.rc lib/rspec/expectations/extensions/rspec/core/example_group.rb
rspec-expectations-2.0.0.beta.22 lib/rspec/expectations/extensions/rspec/core/example_group.rb
rspec-expectations-2.0.0.beta.20 lib/rspec/expectations/extensions/rspec/core/example_group.rb
rspec-expectations-2.0.0.beta.19 lib/rspec/expectations/extensions/rspec/core/example_group.rb
rspec-expectations-2.0.0.beta.18 lib/rspec/expectations/extensions/rspec/core/example_group.rb
rspec-expectations-2.0.0.beta.17 lib/rspec/expectations/extensions/rspec/core/example_group.rb
rspec-expectations-2.0.0.beta.16 lib/rspec/expectations/extensions/rspec/core/example_group.rb