Skip to content

Instantly share code, notes, and snippets.

@igkuz
Last active December 17, 2015 14:39
Show Gist options
  • Save igkuz/5625871 to your computer and use it in GitHub Desktop.
Save igkuz/5625871 to your computer and use it in GitHub Desktop.
describe Telemarker::Aplplication do
include_context :telemarker_app
let(:channels_api_controller) { app.controller('api/controller') }
let(:channels_view) { app.view('channels') }
describe "Channels View Controller" do
it "should get all channels" do
channels_controller = Telemarker::Controllers::View::VideosController.new(channels_view, channels_api_controller)
stub_requested = stub_request(:get, channels_url).
with(body: {credentials: credentials}).
to_return(status: 200, body: load_fixture('channels.json'), headers: {})
channels_controller.show_channels_list
run_requests
assert_requested stub_requested
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment