0.0
No release in over 3 years
Low commit activity in last 3 years
This gem provides extras methods for Rails application.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 2.0.0

Runtime

>= 3.0.0
 Project Readme

RailsExtras

Gem Version

This gem provides extras methods for Rails application.

Installation

Add this line to your application's Gemfile:

gem 'rails_extras'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails_extras

Usage

Helper

add_link('http://example.com', class: 'text-info') do |tag|
  tag.space "link"
  [1, 2, 3].each do |item|
    tag << item.to_s
  end
end #=> <a href='http://example.com', class: 'text-info'>link 123</a>

RSpec

Some times are tests which are faster than browser can reload or load page (click link). For this situations we should use wait_for_ajax mathod. If you want use this method you first should add to file spec_helper.rb this configuration

RSpec.configure do |config|
  config.include ::RailsExtras::RSpec::Support::WaitForAjax, type: :feature
end

and then you can add wait_for_ajax method to your scenario

click_button "Next"
wait_for_ajax
expect(page).to have_content "Next page"

License

RailsExtras uses the MIT license. Please check the LICENSE file for more details.