Sha256: f56526e311330722a382322687f4168e546ba9d30ef89c5316d95432823f3e5b

Contents?: true

Size: 521 Bytes

Versions: 4

Compression:

Stored size: 521 Bytes

Contents

require 'spec_helper'

describe VersionController, type: :controller do
  routes { Maestrano::Connector::Rails::Engine.routes }

  describe 'index' do
    subject { get :index, format: :json }
    before {
      allow(Gem).to receive(:loaded_specs).and_return({'maestrano-connector-rails' => Gem::Specification.new('maestrano-connector-rails', '1.2')})
    }

    it 'returns a version hash' do
      subject
      expect(JSON.parse(response.body)).to eql({"framework_version"=>"1.2", "env" => "test"})
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.0.0.pre.RC12 spec/controllers/version_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC11 spec/controllers/version_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC10 spec/controllers/version_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC9 spec/controllers/version_controller_spec.rb