Sha256: 11ef685bd032a8a25973e62fa02a343f8e0836cbf6969ca34b3fabf71b1054c3

Contents?: true

Size: 1005 Bytes

Versions: 4

Compression:

Stored size: 1005 Bytes

Contents

RSpec.describe Percy do
  subject(:our_module) { Percy }

  describe '#environment_info' do
    subject(:environment_info) { Percy.environment_info }

    context 'an app with Rails, Sinatra and Ember Cli Rails' do
      it 'returns full environment information' do
        expect(our_module).to receive(:_rails_version).at_least(:once).times.and_return('4.2')
        expect(our_module).to receive(:_sinatra_version).at_least(:once).and_return('2.0.0')
        expect(our_module).to receive(:capybara_version).at_least(:once).and_return(Capybara::VERSION)
        expect(our_module).to receive(:_ember_cli_rails_version).at_least(:once).and_return('0.9')

        expect(environment_info).to eq("rails/4.2; sinatra/2.0.0; capybara/#{Capybara::VERSION}; ember-cli-rails/0.9")
      end
    end
  end

  describe '#client_info' do
    subject(:client_info) { Percy.client_info }

    it 'includes client information' do
      expect(client_info).to eq("percy-capybara/#{Percy::VERSION}")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
percy-capybara-4.3.3 spec/lib/percy/environment_spec.rb
percy-capybara-4.3.2 spec/lib/percy/environment_spec.rb
percy-capybara-4.3.1 spec/lib/percy/environment_spec.rb
percy-capybara-4.3.0 spec/lib/percy/environment_spec.rb