Last active
December 12, 2015 03:38
-
-
Save marciok/4707924 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'v1/endpoints/index', formats: [ :json ] do | |
let(:endpoint) { 'http://battle-server-mock.herokuapp.com/1' } | |
describe 'Endpoints API Representation' do | |
before { render } | |
let(:json) { ActiveSupport::JSON.decode(rendered) } | |
subject { json } | |
it { should include('url') } | |
describe 'url' do | |
subject { json['url'] } | |
it { should eql(endpoint) } | |
end | |
end | |
end | |
# Failure/Error: it { should eql(endpoint) } | |
# expected: "http://battle-server-mock.herokuapp.com/1" | |
# got: nil | |
# (compared using eql?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment