Created
July 7, 2009 12:36
-
-
Save zmoazeni/142050 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 File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
require File.expand_path(File.dirname(__FILE__) + '/../spec_helpers/controller_behaviors') | |
describe SomeController do | |
stub_all_filters! | |
describe "#foo" do | |
def do_get | |
get :foo | |
end | |
it "should do something" do | |
controller.send(:instance_variable_set, "@bar", "here's bar") | |
do_get | |
end | |
end | |
end | |
class SomeController < ApplicationController | |
def foo | |
p "need to do something with #{@bar}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment