Sha256: a0bebb9b2d462317b8bec25f22c9a893a2d55788121949b529f90d0f819d8a04
Contents?: true
Size: 684 Bytes
Versions: 11
Compression:
Stored size: 684 Bytes
Contents
require 'spec_helper' 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
11 entries across 11 versions & 1 rubygems