RSpec.configure do |config|
config.mock_framework = :rspec
end
describe "mocking with RSpec" do
it "passes when it should" do
receiver = double('receiver')
receiver.should_receive(:message)
receiver.message
end
end

RSpec.configure do |config|
config.mock_framework = :rspec
end
describe "failed message expectation in a pending block" do
it "is listed as pending" do
pending do
receiver = double('receiver')
receiver.should_receive(:message)
end
end
end

RSpec.configure do |config|
config.mock_framework = :rspec
end
describe "passing message expectation in a pending block" do
it "fails with FIXED" do
pending do
receiver = double('receiver')
receiver.should_receive(:message)
receiver.message
end
end
end

RSpec.configure do |config|
config.mock_framework = :rspec
end
describe "RSpec.configuration.mock_framework.framework_name" do
it "returns :rspec" do
RSpec.configuration.mock_framework.framework_name.should eq(:rspec)
end
end