Sha256: ce72998be75bbd4095a30db90bc9e68de5b2ca38e2046bff9c4d55a0d73bfc73

Contents?: true

Size: 1.31 KB

Versions: 41

Compression:

Stored size: 1.31 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_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

41 entries across 41 versions & 9 rubygems

Version Path
jcnetdev-rspec-rails-1.1.5 spec/rails/autotest/mappings_spec.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb
jstorimer-deep-test-2.0.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
jstorimer-deep-test-1.4.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
jstorimer-deep-test-1.3.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
jstorimer-deep-test-1.2.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
jstorimer-deep-test-1.1.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
jstorimer-deep-test-1.0.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
jstorimer-deep-test-0.2.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
jstorimer-deep-test-0.1.0 sample_rails_project/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
picolena-0.1.1 rails_plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
picolena-0.1.0 rails_plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
picolena-0.1.4 rails_plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
picolena-0.1.3 rails_plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
picolena-0.1.2 rails_plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb
picolena-0.1.5 rails_plugins/rspec_on_rails/spec/rails/autotest/mappings_spec.rb