Sha256: 83f1e8aec4c2bbd4fc4a4cf083aec6e0f3141e59025e58e6c78752d337c9615d

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

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(:_ember_cli_rails_version).at_least(:once).and_return('0.9')

        expect(environment_info).to eq('rails/4.2; sinatra/2.0.0; ember-cli-rails/0.9')
      end
    end

    context 'an app with no known frameworks being used' do
      it 'returns unknown environment information' do
        expect(environment_info).to eq('unknown')
      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

8 entries across 8 versions & 1 rubygems

Version Path
percy-capybara-4.2.0 spec/lib/percy/environment_spec.rb
percy-capybara-4.1.1 spec/lib/percy/environment_spec.rb
percy-capybara-4.1.0 spec/lib/percy/environment_spec.rb
percy-capybara-4.0.2 spec/lib/percy/environment_spec.rb
percy-capybara-4.0.1 spec/lib/percy/environment_spec.rb
percy-capybara-4.0.0 spec/lib/percy/environment_spec.rb
percy-capybara-4.0.0.pre.beta2 spec/lib/percy/environment_spec.rb
percy-capybara-4.0.0.pre.beta1 spec/lib/percy/environment_spec.rb