Sha256: f81ad955b4cf4b5082913c0643e9402a2e9055a0a75a8c7c2618ea2d20dc8ab0

Contents?: true

Size: 565 Bytes

Versions: 11

Compression:

Stored size: 565 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require 'mspec/helpers/fixture'

describe Object, "#fixture" do
  before :each do
    @dir = File.expand_path(Dir.pwd)
  end

  it "returns the expanded path to a fixture file" do
    name = fixture("some/path/file.rb", "dir", "file.txt")
    name.should == "#{@dir}/some/path/fixtures/dir/file.txt"
  end

  it "omits '/shared' if it is the suffix of the directory string" do
    name = fixture("some/path/shared/file.rb", "dir", "file.txt")
    name.should == "#{@dir}/some/path/fixtures/dir/file.txt"
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mspec-1.5.15 spec/helpers/fixture_spec.rb
mspec-1.5.14 spec/helpers/fixture_spec.rb
mspec-1.5.13 spec/helpers/fixture_spec.rb
mspec-1.5.10 spec/helpers/fixture_spec.rb
mspec-1.5.11 spec/helpers/fixture_spec.rb
mspec-1.5.12 spec/helpers/fixture_spec.rb
mspec-1.5.9 spec/helpers/fixture_spec.rb
mspec-1.5.5 spec/helpers/fixture_spec.rb
mspec-1.5.7 spec/helpers/fixture_spec.rb
mspec-1.5.8 spec/helpers/fixture_spec.rb
mspec-1.5.6 spec/helpers/fixture_spec.rb