Sha256: 12a7fdd24954f32c237b49ec2f4f7c617aed52a6a163ed9e055d5110f0af4474
Contents?: true
Size: 719 Bytes
Versions: 1
Compression:
Stored size: 719 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper.rb' module Rspec module Matchers module DSL describe "#define" do it "creates a method that initializes a new matcher with the submitted name and expected arg" do # FIXME - this expects new to be called, but we need something # more robust - that expects new to be called with a specific # block (lambda, proc, whatever) mod = Module.new mod.extend Rspec::Matchers::DSL mod.define(:foo) obj = Object.new obj.extend mod Rspec::Matchers::Matcher.should_receive(:new).with(:foo, 3) obj.foo(3) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-expectations-2.0.0.a2 | spec/rspec/matchers/dsl_spec.rb |