Sha256: 52ac2eb614cafb58aaa74deb7b9f1fd2ff573042f642b1e2b47f0ef7243ca8c5

Contents?: true

Size: 350 Bytes

Versions: 3

Compression:

Stored size: 350 Bytes

Contents

require 'spec_helper'

describe "exist" do
  it 'passes when the file exists' do
    File.stub(:exists?).with('/some/file/path').and_return(true)
    '/some/file/path'.should exist
  end
  it 'fails when the file does not exist' do
    File.stub(:exists?).with('/some/file/path').and_return(false)
    '/some/file/path'.should_not exist
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ammeter-0.0.3 spec/rspec/rails/generator/matchers/exist_spec.rb
ammeter-0.0.2 spec/rspec/rails/generator/matchers/exist_spec.rb
ammeter-0.0.1 spec/rspec/rails/generator/matchers/exist_spec.rb