Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'spec/rails'


def should_render(method_name, params = {})
  specify "#{method_name.to_s} should render" do
    get method_name, params
    begin
      response.should be_success
    rescue Exception => e
      puts response.body
      raise e
    end
  end
end