Created
January 6, 2012 16:55
-
-
Save apraditya/1571421 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 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