Sha256: 8d30a9ad3a2baf8fdeb0e4527b88df58138149e2949d2aedda772ce056b0068e

Contents?: true

Size: 525 Bytes

Versions: 4

Compression:

Stored size: 525 Bytes

Contents

module AcceptanceTests
  module RspecHelpers
    include GemHelpers

    def rspec_rails_version
      bundle_version_of('rspec-rails')
    end

    def add_rspec_file(path, content)
      content = "require '#{spec_helper_require_path}'\n#{content}"
      write_file path, content
    end

    def spec_helper_require_path
      if rspec_rails_version >= 3
        'rails_helper'
      else
        'spec_helper'
      end
    end

    def spec_helper_file_path
      "spec/#{spec_helper_require_path}.rb"
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/shoulda-matchers-2.8.0/spec/support/acceptance/helpers/rspec_helpers.rb
shoulda-matchers-2.8.0 spec/support/acceptance/helpers/rspec_helpers.rb
shoulda-matchers-2.8.0.rc2 spec/support/acceptance/helpers/rspec_helpers.rb
shoulda-matchers-2.8.0.rc1 spec/support/acceptance/helpers/rspec_helpers.rb