changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb

changeset 16: 01fd3f10ae84
author: moriq@moriq.com
date: Mon Mar 10 10:13:18 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec_on_rails
1require File.dirname(__FILE__) + '/../../spec_helper'
2require File.join(File.dirname(__FILE__), *%w[.. .. .. lib autotest rails_rspec])
3require File.join(File.dirname(__FILE__), *%w[.. .. .. .. rspec spec autotest_matchers])
4
5describe Autotest::RailsRspec, "file mapping" do
6 before(:each) do
7 @autotest = Autotest::RailsRspec.new
8 @autotest.hook :initialize
9 end
10
11 it "should map model example to model" do
12 @autotest.should map_specs(['spec/models/thing_spec.rb']).
13 to('app/models/thing.rb')
14 end
15
16 it "should map controller example to controller" do
17 @autotest.should map_specs(['spec/controllers/things_controller_spec.rb']).
18 to('app/controllers/things_controller.rb')
19 end
20
21 it "should map view.rhtml" do
22 @autotest.should map_specs(['spec/views/things/index.rhtml_spec.rb']).
23 to('app/views/things/index.rhtml')
24 end
25
26 it "should map view.rhtml with underscores in example filename" do
27 @autotest.should map_specs(['spec/views/things/index_rhtml_spec.rb']).
28 to('app/views/things/index.rhtml')
29 end
30
31 it "should map view.html.erb" do
32 @autotest.should map_specs(['spec/views/things/index.html.erb_spec.rb']).
33 to('app/views/things/index.html.erb')
34 end
35
36end