aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/track_controller_spec.rb
diff options
context:
space:
mode:
authortony <tony>2009-03-19 12:32:37 +0000
committertony <tony>2009-03-19 12:32:37 +0000
commitd12cd18af240d6495d57ca242a41ac9989388f00 (patch)
treea3dbe96e45046d875dbccb2fadc8cb99aa31b550 /spec/controllers/track_controller_spec.rb
parenta6c405f3e893107ab1f3c944742a982376b98c4b (diff)
Use mocks instead of fixtures
Diffstat (limited to 'spec/controllers/track_controller_spec.rb')
-rw-r--r--spec/controllers/track_controller_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb
index 248d94a74..7ab1c0a70 100644
--- a/spec/controllers/track_controller_spec.rb
+++ b/spec/controllers/track_controller_spec.rb
@@ -1,12 +1,12 @@
require File.dirname(__FILE__) + '/../spec_helper'
describe TrackController, "when making a new track on a request" do
- integrate_views
- fixtures :info_requests, :outgoing_messages, :incoming_messages, :raw_emails, :info_request_events, :users
-
before do
- @ir = info_requests(:fancy_dog_request)
- @user = users(:bob_smith_user)
+ @ir = mock_model(InfoRequest, :url_title => 'myrequest', :title => 'My request')
+ InfoRequest.stub!(:find_by_url_title).and_return(@ir)
+
+ @user = mock_model(User)
+ User.stub!(:find).and_return(@user)
end
it "should require login when making new track" do