Skip to content

Instantly share code, notes, and snippets.

@ruralocity
Created November 15, 2013 19:45
Show Gist options
  • Save ruralocity/7490444 to your computer and use it in GitHub Desktop.
Save ruralocity/7490444 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe 'path/to/view.html.erb' do
it "renders JavaScript to connect to a pretend API" do
render
expect(rendered).to match("api_key: '#{ENV['API_KEY']}',")
expect(rendered).to match("api_endpoint: '#{ENV['API_KEY']}',")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment