Sha256: 7cae2faa9c2b445e92e14f8a95ff4e30446d6ece2f01a45545a0aa1160ef5210

Contents?: true

Size: 1.29 KB

Versions: 23

Compression:

Stored size: 1.29 KB

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require File.dirname(__FILE__) + '/../../lib/autotest/rails_rspec'
require File.dirname(__FILE__) + '/../../../rspec/spec/autotest/autotest_matchers'

describe Autotest::RailsRspec, "file mapping" do
  before(:each) do
    @autotest = Autotest::RailsRspec.new
    @autotest.hook :initialize
  end
  
  it "should map model example to model" do
    @autotest.should map_specs(['spec/models/thing_spec.rb']).
                            to('app/models/thing.rb')
  end
  
  it "should map controller example to controller" do
    @autotest.should map_specs(['spec/controllers/things_controller_spec.rb']).
                            to('app/controllers/things_controller.rb')
  end
  
  it "should map view.rhtml" do
    @autotest.should map_specs(['spec/views/things/index.rhtml_spec.rb']).
                            to('app/views/things/index.rhtml')
  end
  
  it "should map view.rhtml with underscores in example filename" do
    @autotest.should map_specs(['spec/views/things/index_rhtml_spec.rb']).
                            to('app/views/things/index.rhtml')
  end
  
  it "should map view.html.erb" do
    @autotest.should map_specs(['spec/views/things/index.html.erb_spec.rb']).
                            to('app/views/things/index.html.erb')
  end
  
end

Version data entries

23 entries across 23 versions & 4 rubygems

Version Path
dchelimsky-rspec-rails-1.1.11.4 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.11.5 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.11.6 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.11.7 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.12 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.1 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.13 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.2 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.3 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.4 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.5 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.6 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.7 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.8 spec/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.99.9 spec/autotest/mappings_spec.rb
mcmire-rspec-rails-1.1.99.9 spec/autotest/mappings_spec.rb
rspec-rails-1.1.12 spec/autotest/mappings_spec.rb
rspec-rails-1.2.0 spec/autotest/mappings_spec.rb
spree-0.6.0 vendor/plugins/rspec-rails/spec/autotest/mappings_spec.rb
spree-0.7.0 vendor/plugins/rspec-rails/spec/autotest/mappings_spec.rb