Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Allow routing to fixtures that are in subfolders #36

Merged
merged 1 commit into from

2 participants

@mordaroso

I've noticed that rendering fixtures in subfolders doesn't work.

This works:
spec/fixtures/fixture.html.haml

loadFixtures("fixture")

But this fails:
spec/fixtures/subfolder/fixture.html.haml

loadFixtures("subfolder/fixture")

Changing the routing parameter catching fixed the issue.

@bradphelan bradphelan merged commit d1e3681 into bradphelan:master
@bradphelan
Owner

Thanks @mordaroso for the patch. Always appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 22, 2012
  1. @mordaroso

    Allow routing to fixtures that are in subfolders (e.g. spec/fixtures/…

    mordaroso authored
    …subfolder/fixture.html.haml)
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 config/routes.rb
View
4 config/routes.rb
@@ -1,8 +1,8 @@
Jasminerice::Engine.routes.draw do
resources :spec, :controller => 'spec', :only => [:index] do
- get "fixtures/:filename", :action => :fixtures
+ get "fixtures/*filename", :action => :fixtures
end
- match "fixtures/:filename", :to => "spec#fixtures#:filename"
+ match "fixtures/*filename", :to => "spec#fixtures"
root :to => "spec#index"
end
Something went wrong with that request. Please try again.