Sha256: 5f6422b86c7d43ef5b671206a215dde8e55517290939a4f4c0fd80f77a6386c5

Contents?: true

Size: 391 Bytes

Versions: 9

Compression:

Stored size: 391 Bytes

Contents

require 'spec_helper'
require 'mspec/guards'
require 'mspec/helpers'

describe Object, "#mock_to_path" do
  it "returns an object that responds to #to_path" do
    obj = mock_to_path("foo")
    obj.should respond_to(:to_path)
    obj.to_path
  end

  it "returns the provided path when #to_path is called" do
    obj = mock_to_path("/tmp/foo")
    obj.to_path.should == "/tmp/foo"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mspec-1.9.1 spec/helpers/mock_to_path_spec.rb
mspec-1.9.0 spec/helpers/mock_to_path_spec.rb
mspec-1.8.0 spec/helpers/mock_to_path_spec.rb
mspec-1.7.0 spec/helpers/mock_to_path_spec.rb
mspec-1.6.0 spec/helpers/mock_to_path_spec.rb
mspec-1.5.21 spec/helpers/mock_to_path_spec.rb
mspec-1.5.20 spec/helpers/mock_to_path_spec.rb
mspec-1.5.19 spec/helpers/mock_to_path_spec.rb
mspec-1.5.18 spec/helpers/mock_to_path_spec.rb