Sha256: 8285e3ad4b4abb583b13117202c72b1f466b9a736f9f75385228aa5ba884f24a

Contents?: true

Size: 1.32 KB

Versions: 17

Compression:

Stored size: 1.32 KB

Contents

require File.dirname(__FILE__) + '/../../spec_helper'
require File.join(File.dirname(__FILE__), *%w[.. .. .. lib autotest rails_rspec])
require File.join(File.dirname(__FILE__), *%w[.. .. .. .. 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

17 entries across 17 versions & 3 rubygems

Version Path
dchelimsky-rspec-rails-1.1.10 spec/rails/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.11.1 spec/rails/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.11.2 spec/rails/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.11.3 spec/rails/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.11 spec/rails/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.6 spec/rails/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.7 spec/rails/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.8 spec/rails/autotest/mappings_spec.rb
dchelimsky-rspec-rails-1.1.9 spec/rails/autotest/mappings_spec.rb
rspec-rails-1.1.11 spec/rails/autotest/mappings_spec.rb
rspec-rails-1.1.10 spec/rails/autotest/mappings_spec.rb
rspec-rails-1.1.6 spec/rails/autotest/mappings_spec.rb
rspec-rails-1.1.9 spec/rails/autotest/mappings_spec.rb
rspec-rails-1.1.7 spec/rails/autotest/mappings_spec.rb
rspec-rails-1.1.8 spec/rails/autotest/mappings_spec.rb
typo-5.1.98 vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb
typo-5.2 vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb