Skip to content

Instantly share code, notes, and snippets.

@apraditya
Created January 6, 2012 16:55
Show Gist options
  • Save apraditya/1571421 to your computer and use it in GitHub Desktop.
Save apraditya/1571421 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe SubscriptionsController do
context "Actions" do
before do
stub_out_user(controller, @user = Factory.stub(:user))
@plan = Factory(:plan)
@params = {}
end
describe "GET 'new'" do
before do
@subscription = @plan.subscriptions.build
end
it "should be successful" do
get 'new'
response.should be_success
end
it "should initialize a new subscription" do
get 'new'
assigns(:subscription).should eql(@subscription)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment