Coder Social home page Coder Social logo

rspec-rails-extra-routing's Introduction

RSpec Rails Extra Routing v0.1.0

Description

I've implement this gem to code some ideas of mine about how should be the rspec-route DSL.
Maybe some of this ideas makes sense for others developers, and can be joined to the rspec-rails in the future.
For now, is there only one feature 100% finished, but soon enough will be others.
Any feed back is welcomed.

Features

Hyper Shortcuts Pull Request discussion

This feature object is to simplify and DRY(Don't Repeat Yourself) the way you write your route test.

# Old Way
describe "GET /" do
  it { get("/").should route_to(
    :controller => "users",
    :action => "index"
  ) }
end

# HyperShortcut Way
get("/").should route_to(
  :controller => "users",
  :action => "index"
)

How use

Install the gem:

gem install rspec-rails-extra-routing

Load the gem in Gemfile:

# Gemfile
group :test do
  gem 'rspec-rails-extra-routing'
end

and require it above require "rspec/rails" in your spec/spec_helper file:

# spec/spec_helper.rb
... 
require "rspec/rails"
require "rspec/rails/extra/routing" # or rspec/rails/extra/FEATURE-PATH to
                                    # load a specific feature
...

Copyright

Copyright (c) 2011 HugoLnx. See LICENSE.txt for further details.

rspec-rails-extra-routing's People

Contributors

hugolnx avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.