Skip to content

Conversation

@HugoLnx
Copy link

@HugoLnx HugoLnx commented Mar 26, 2011

Hello :D
Im code to improve the routing tests DSL, so in first time I allow to do this...
# Before
describe "GET /users" do
it { get("/users").should route_to "users#index"}
end

# Now
describe ( get "/users" ) do
  it { should route_to "users#index" }
end

In future I plan to that became this...
# In Future
describe "User Routing" do
get("/").should route_to "users#index"
get("/4").should route_to "users#show"
put("/3").should route_to "users#update"
end

Some tests in cucumber don't pass even before my modification, I don't know that happens just here, or something. Any problem, or suggestion, I ready to refactor ;)
thanks for you attention :D
( sorry about my bad english )

@dchelimsky
Copy link
Contributor

I really like the future version you've proposed, but I don't really want to merge this version. We just added (and have yet to release) get("/").should route_to("users#index") within an example, so going from:

describe "User routing" do
  it "routes / to users#index" do
    get("/").should route_to("users#index")
  end
end

to this:

describe "User routing" do
  get("/").should route_to("users#index")
end

is a very natural progression, and I'm sure users will be comfortable/happy with it. Adding describe (get "/") do now would just be confusing, and a more complicated transition from what we have today.

I'm going to close this request, but I look forward to merging the future version you've proposed.

Cheers,
David

@dchelimsky dchelimsky closed this Mar 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants