1require File.dirname(__FILE__) + '/../../spec_helper'
2
3describe "assert_equal", :shared => true do
4 it "like assert_equal" do
5 assert_equal 1, 1
6 lambda {
7 assert_equal 1, 2
8 }.should raise_error(Test::Unit::AssertionFailedError)
9 end
10end
11
12describe "A model spec should be able to access 'test/unit' assertions", :type => :model do
13 it_should_behave_like "assert_equal"
14end
15
16describe "A view spec should be able to access 'test/unit' assertions", :type => :view do
17 it_should_behave_like "assert_equal"
18end
19
20describe "A helper spec should be able to access 'test/unit' assertions", :type => :helper do
21 it_should_behave_like "assert_equal"
22end
23
24describe "A controller spec with integrated views should be able to access 'test/unit' assertions", :type => :controller do
25 controller_name :controller_spec
26 integrate_views
27 it_should_behave_like "assert_equal"
28end
29
30describe "A controller spec should be able to access 'test/unit' assertions", :type => :controller do
31 controller_name :controller_spec
32 it_should_behave_like "assert_equal"
33end