Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rogercampos/budgetcounts
base: fe7f648634
...
head fork: rogercampos/budgetcounts
compare: b5816f4833
  • 4 commits
  • 29 files changed
  • 0 commit comments
  • 1 contributor
Showing with 524 additions and 38 deletions.
  1. +4 −4 app/controllers/entries_controller.rb
  2. +52 −0 app/controllers/filters_controller.rb
  3. +38 −16 app/controllers/graphs_controller.rb
  4. +2 −2 app/controllers/overview_controller.rb
  5. +2 −0  app/helpers/filters_helper.rb
  6. +3 −0  app/models/ability.rb
  7. +1 −0  app/models/account.rb
  8. +7 −0 app/models/entry.rb
  9. +23 −0 app/models/filter.rb
  10. +0 −4 app/stylesheets/partials/_graphs.scss
  11. +2 −0  app/views/entries/_accounts_bar.html.haml
  12. +17 −0 app/views/filters/index.html.haml
  13. +13 −0 app/views/filters/new.html.haml
  14. +1 −1  app/views/graphs/_abstraction.html.haml
  15. +1 −2  app/views/overview/graphs.html.haml
  16. +2 −1  config/routes.rb
  17. +15 −0 db/migrate/20120317205701_create_filters.rb
  18. +9 −1 db/schema.rb
  19. +0 −7 public/stylesheets/screen.css
  20. +164 −0 spec/controllers/filters_controller_spec.rb
  21. +9 −0 spec/factories/filters.rb
  22. +15 −0 spec/helpers/filters_helper_spec.rb
  23. +5 −0 spec/models/filter_spec.rb
  24. +11 −0 spec/requests/filters_spec.rb
  25. +35 −0 spec/routing/filters_routing_spec.rb
  26. +22 −0 spec/views/filters/edit.html.haml_spec.rb
  27. +28 −0 spec/views/filters/index.html.haml_spec.rb
  28. +22 −0 spec/views/filters/new.html.haml_spec.rb
  29. +21 −0 spec/views/filters/show.html.haml_spec.rb
View
8 app/controllers/entries_controller.rb
@@ -114,14 +114,14 @@ def destroy
unless @entry.destroy
flash[:alert] = @entry.errors.full_messages
end
- redirect_to entries_url(:year => @entry.cashed_at.year, :trimester => (@entry.cashed_at.month - 1) / 3 + 1)
+ redirect_to_back_or_default
end
def recalculation
authorize! :recalculation, @account
Entry.recalculate_for(@account)
- redirect_to request.env["HTTP_REFERER"] || entries_url, :notice => "Tota la linea ha estat recalculada"
+ redirect_to_back_or_default
end
def reorder
@@ -148,7 +148,7 @@ def verify
end
@account.entries.update_all({:verified => true}, conds)
- redirect_to request.env["HTTP_REFERER"] || entries_url
+ redirect_to_back_or_default
end
def unverify
@@ -163,7 +163,7 @@ def unverify
end
@account.entries.update_all({:verified => false}, conds )
- redirect_to request.env["HTTP_REFERER"] || entries_url
+ redirect_to_back_or_default
end
View
52 app/controllers/filters_controller.rb
@@ -0,0 +1,52 @@
+class FiltersController < ApplicationController
+ load_and_authorize_resource :account
+ load_and_authorize_resource :filter, :through => :account
+
+ def index
+ @groups = @account.groups
+
+ respond_to do |format|
+ format.html # index.html.erb
+ end
+ end
+
+ def new
+ @groups = @account.groups
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @filter }
+ end
+ end
+
+ def create
+ respond_to do |format|
+ if @filter.save
+ format.html { redirect_to account_filters_url }
+ else
+ format.html { render :action => "new" }
+ end
+ end
+ end
+
+ def update
+ respond_to do |format|
+ if @filter.update_attributes(params[:filter])
+ format.html { redirect_to(@filter, :notice => 'Filter was successfully updated.') }
+ format.json { head :ok }
+ else
+ format.html { render :action => "edit" }
+ format.json { render :xml => @filter.errors, :status => :unprocessable_entity }
+ end
+ end
+ end
+
+ def destroy
+ @filter.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(account_filters_url) }
+ format.xml { head :ok }
+ end
+ end
+end
View
54 app/controllers/graphs_controller.rb
@@ -1,28 +1,50 @@
class GraphsController < ApplicationController
- def expenses_for_month
- month_num = params[:month].present? ? params[:month].to_i : 1
+ def expenses
+ @account = current_user.accounts.first
+ @groups = @account.groups.all
- data = Rails.cache.read("graph_user_#{current_user}_month_#{month_num}")
+ data = Rails.cache.read("graph_user_#{current_user}_account_#{@account}")
- unless data
- date_ini = Date.new(2011, month_num, 1)
+ if data
+ render :json => data
+ return
+ end
- data = []
- current_user.accounts.each do |account|
- data += account.entries.expenses.for_period(date_ini, 1.month)
- end
- data = data.group_by{|x| x.group}
+ series = []
+
+ @groups.each_with_index do |group, i|
+ series[i] = []
- data = data.map{|k, v| [k ? k.name : "Sin grupo", v.map{|x| x.import}.sum ]}
+ months_to_iterate.times do |x|
+ series[i] << @account.entries.expenses.for_period(initial_date + x.months, 1.month).for_group(group).sum(:import).round * -1
+ end
+ end
- total = data.map{|x| x.last}.sum
- data.each{|x| x[-1] = ( x.last / total * 100 ).round(1)}
+ Rails.cache.write("graph_user_#{current_user}_account_#{@account}", data)
- data.sort!{|a,b| a.last <=> b.last}
+ data = {:categories => months_list, :series => series}
+ render :json => data.to_json
+ end
- Rails.cache.write("graph_user_#{current_user}_month_#{month_num}", data)
+protected
+ # always in 1..12
+ def months_to_iterate(opts = {})
+ if initial_date.year == Date.today.year
+ Date.today.month.to_i
+ else
+ 12
end
+ end
- render :json => {:categories => [], :series => [ data ]}
+ def months_list(opts = {})
+ months_to_iterate(opts).times.map {|x| (initial_date(opts) + x.months).strftime("%B")}
+ end
+
+ def initial_date(opts = {})
+ @initial_date ||= if params[:year]
+ Date.new(params[:year].to_i, 1, 1)
+ else
+ Date.new(Date.today.year, 1, 1)
+ end
end
end
View
4 app/controllers/overview_controller.rb
@@ -1,5 +1,5 @@
class OverviewController < ApplicationController
- def index
-
+ def graphs
+ @group_names = current_user.accounts.first.groups.all.map(&:to_s)
end
end
View
2  app/helpers/filters_helper.rb
@@ -0,0 +1,2 @@
+module FiltersHelper
+end
View
3  app/models/ability.rb
@@ -9,6 +9,9 @@ def initialize(user)
can :manage, Group, :account => { :user_account_relations => {:user_id => user.id, :role => "full"} }
can :read, Group, :account => { :user_account_relations => {:user_id => user.id} }
+ can :manage, Filter, :account => { :user_account_relations => {:user_id => user.id, :role => "full"} }
+ can :read, Filter, :account => { :user_account_relations => {:user_id => user.id} }
+
can :manage, Entry, :account => { :user_account_relations => {:user_id => user.id, :role => "full"} }
can :read, Entry, :account => { :user_account_relations => {:user_id => user.id} }
end
View
1  app/models/account.rb
@@ -1,6 +1,7 @@
class Account < ActiveRecord::Base
belongs_to :owner, :class_name => "User"
has_many :groups, :dependent => :destroy
+ has_many :filters, :dependent => :destroy
has_many :entries, :dependent => :destroy
has_many :user_account_relations
View
7 app/models/entry.rb
@@ -27,11 +27,13 @@ class Entry < ActiveRecord::Base
after_destroy :fix_top_entries
before_destroy :check_unconfirmed
after_update :expire_cache
+ before_save :set_group_by_filters
scope :ordered, order("entries.cashed_at DESC").order("entries.order DESC")
scope :reversed, order("entries.cashed_at ASC").order("entries.order ASC")
scope :for_period, lambda { |start_date, duration| where("cashed_at >= ?", start_date).where("cashed_at < ?", start_date + duration) }
scope :cashed_before, lambda { |date| where("cashed_at < ?", date) }
+ scope :for_group, lambda {|group| where(:group_id => group) }
scope :verified, where(:verified => true)
scope :unverified, where(:verified => false)
@@ -204,4 +206,9 @@ def import_cannot_be_zero
def expire_cache
Rails.cache.delete("graph_user_#{account.owner}_month_#{cashed_at.month}")
end
+
+ def set_group_by_filters
+ return unless group.nil?
+ self.group = Filter.matching_group(concept, account.filters)
+ end
end
View
23 app/models/filter.rb
@@ -0,0 +1,23 @@
+class Filter < ActiveRecord::Base
+ belongs_to :account
+ belongs_to :group
+
+ validates_presence_of :account, :group, :matching_regexp
+ validate :group_inside_account
+
+ def matches_with?(str)
+ ( str =~ /#{matching_regexp}/ ) ? self : nil
+ end
+
+ def self.matching_group(str, filters)
+ return nil if filters.empty?
+ filters.detect{|x| x.matches_with?(str)}.try(:group)
+ end
+
+private
+ def group_inside_account
+ return if account.nil? || group.nil?
+
+ errors.add(:group, "must be inside the account") unless account.groups.include?(group)
+ end
+end
View
4 app/stylesheets/partials/_graphs.scss
@@ -1,6 +1,2 @@
.graph {
- height: 400px;
- width: 400px;
- display: inline;
- float: left;
}
View
2  app/views/entries/_accounts_bar.html.haml
@@ -2,6 +2,8 @@
= link_to "Gestió de comptes i targetes", accounts_path, :class => "button right"
- if @account && can?(:create, @account.groups.build)
= link_to "Gestiona els grups d'aquest compte", account_groups_path(@account), :class => "button right"
+ - if @account && can?(:create, @account.filters.build)
+ = link_to "Gestiona els filtres d'aquest compte", account_filters_path(@account), :class => "button right"
= form_tag "#", :id => "account_assignation" do
Actual compte / targeta:
View
17 app/views/filters/index.html.haml
@@ -0,0 +1,17 @@
+%h1 Listing filters
+
+%table
+ %tr
+ %th Matching regexp
+ %th Group
+ %th
+
+ - @filters.each do |filter|
+ %tr
+ %td= best_in_place filter, :matching_regexp, :path => [@account, filter]
+ %td= best_in_place filter, :group_id, :type => :select, :collection => @groups.map{|x| [x.id, x.to_s]}, :path => [@account, filter]
+ %td= link_to 'Destroy', [@account, filter], :confirm => 'Are you sure?', :method => :delete
+
+%br
+
+= link_to 'New Filter', new_account_filter_path
View
13 app/views/filters/new.html.haml
@@ -0,0 +1,13 @@
+%h1 New filter
+
+= simple_form_for([@account, @filter]) do |f|
+ = f.error_notification
+
+ .form-inputs
+ = f.input :matching_regexp, :autofocus => true
+ = f.association :group, :collection => @groups, :include_blank => false
+
+ .form-actions
+ = f.button :submit
+
+= link_to 'Back', account_filters_path
View
2  app/views/graphs/_abstraction.html.haml
@@ -1,4 +1,4 @@
-- token = "#{name}_#{month}"
+- token = name
.graph
%p{:id => "#{token}_text"}
%div{:class => "highchart", :id => token}
View
3  app/views/overview/graphs.html.haml
@@ -2,5 +2,4 @@
= javascript_include_tag "highcharts"
-- 12.times do |i|
- = render "graphs/abstraction", :name => "expenses_for_month", :url => expenses_for_month_graphs_path(:month => i+1), :title => "Expenses for #{Date.new(2011, i+1, 1).strftime("%B")}", :type => "pie", :month => i
+= render "graphs/abstraction", :name => "expenses", :url => expenses_graphs_path, :title => "Expenses", :unit_title => "€", :series => @group_names
View
3  config/routes.rb
@@ -10,6 +10,7 @@
resources :accounts do
resources :groups
+ resources :filters
member do
get :la_caixa_view
@@ -35,7 +36,7 @@
resource :graphs do
member do
- get :expenses_for_month
+ get :expenses
end
end
View
15 db/migrate/20120317205701_create_filters.rb
@@ -0,0 +1,15 @@
+class CreateFilters < ActiveRecord::Migration
+ def self.up
+ create_table :filters do |t|
+ t.string :matching_regexp
+ t.integer :account_id
+ t.integer :group_id
+
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :filters
+ end
+end
View
10 db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120219183735) do
+ActiveRecord::Schema.define(:version => 20120317205701) do
create_table "accounts", :force => true do |t|
t.string "number"
@@ -38,6 +38,14 @@
t.integer "group_id"
end
+ create_table "filters", :force => true do |t|
+ t.string "matching_regexp"
+ t.integer "account_id"
+ t.integer "group_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "groups", :force => true do |t|
t.integer "account_id"
t.string "name"
View
7 public/stylesheets/screen.css
@@ -3100,13 +3100,6 @@ textarea#entry_notes {
background: #8A99D0;
}
-.graph {
- height: 400px;
- width: 400px;
- display: inline;
- float: left;
-}
-
#lacaixa_valid_login {
width: 200px;
height: 100px;
View
164 spec/controllers/filters_controller_spec.rb
@@ -0,0 +1,164 @@
+require 'spec_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator. If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails. There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec. Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+describe FiltersController do
+
+ # This should return the minimal set of attributes required to create a valid
+ # Filter. As you add validations to Filter, be sure to
+ # update the return value of this method accordingly.
+ def valid_attributes
+ {}
+ end
+
+ # This should return the minimal set of values that should be in the session
+ # in order to pass any filters (e.g. authentication) defined in
+ # FiltersController. Be sure to keep this updated too.
+ def valid_session
+ {}
+ end
+
+ describe "GET index" do
+ it "assigns all filters as @filters" do
+ filter = Filter.create! valid_attributes
+ get :index, {}, valid_session
+ assigns(:filters).should eq([filter])
+ end
+ end
+
+ describe "GET show" do
+ it "assigns the requested filter as @filter" do
+ filter = Filter.create! valid_attributes
+ get :show, {:id => filter.to_param}, valid_session
+ assigns(:filter).should eq(filter)
+ end
+ end
+
+ describe "GET new" do
+ it "assigns a new filter as @filter" do
+ get :new, {}, valid_session
+ assigns(:filter).should be_a_new(Filter)
+ end
+ end
+
+ describe "GET edit" do
+ it "assigns the requested filter as @filter" do
+ filter = Filter.create! valid_attributes
+ get :edit, {:id => filter.to_param}, valid_session
+ assigns(:filter).should eq(filter)
+ end
+ end
+
+ describe "POST create" do
+ describe "with valid params" do
+ it "creates a new Filter" do
+ expect {
+ post :create, {:filter => valid_attributes}, valid_session
+ }.to change(Filter, :count).by(1)
+ end
+
+ it "assigns a newly created filter as @filter" do
+ post :create, {:filter => valid_attributes}, valid_session
+ assigns(:filter).should be_a(Filter)
+ assigns(:filter).should be_persisted
+ end
+
+ it "redirects to the created filter" do
+ post :create, {:filter => valid_attributes}, valid_session
+ response.should redirect_to(Filter.last)
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns a newly created but unsaved filter as @filter" do
+ # Trigger the behavior that occurs when invalid params are submitted
+ Filter.any_instance.stub(:save).and_return(false)
+ post :create, {:filter => {}}, valid_session
+ assigns(:filter).should be_a_new(Filter)
+ end
+
+ it "re-renders the 'new' template" do
+ # Trigger the behavior that occurs when invalid params are submitted
+ Filter.any_instance.stub(:save).and_return(false)
+ post :create, {:filter => {}}, valid_session
+ response.should render_template("new")
+ end
+ end
+ end
+
+ describe "PUT update" do
+ describe "with valid params" do
+ it "updates the requested filter" do
+ filter = Filter.create! valid_attributes
+ # Assuming there are no other filters in the database, this
+ # specifies that the Filter created on the previous line
+ # receives the :update_attributes message with whatever params are
+ # submitted in the request.
+ Filter.any_instance.should_receive(:update_attributes).with({'these' => 'params'})
+ put :update, {:id => filter.to_param, :filter => {'these' => 'params'}}, valid_session
+ end
+
+ it "assigns the requested filter as @filter" do
+ filter = Filter.create! valid_attributes
+ put :update, {:id => filter.to_param, :filter => valid_attributes}, valid_session
+ assigns(:filter).should eq(filter)
+ end
+
+ it "redirects to the filter" do
+ filter = Filter.create! valid_attributes
+ put :update, {:id => filter.to_param, :filter => valid_attributes}, valid_session
+ response.should redirect_to(filter)
+ end
+ end
+
+ describe "with invalid params" do
+ it "assigns the filter as @filter" do
+ filter = Filter.create! valid_attributes
+ # Trigger the behavior that occurs when invalid params are submitted
+ Filter.any_instance.stub(:save).and_return(false)
+ put :update, {:id => filter.to_param, :filter => {}}, valid_session
+ assigns(:filter).should eq(filter)
+ end
+
+ it "re-renders the 'edit' template" do
+ filter = Filter.create! valid_attributes
+ # Trigger the behavior that occurs when invalid params are submitted
+ Filter.any_instance.stub(:save).and_return(false)
+ put :update, {:id => filter.to_param, :filter => {}}, valid_session
+ response.should render_template("edit")
+ end
+ end
+ end
+
+ describe "DELETE destroy" do
+ it "destroys the requested filter" do
+ filter = Filter.create! valid_attributes
+ expect {
+ delete :destroy, {:id => filter.to_param}, valid_session
+ }.to change(Filter, :count).by(-1)
+ end
+
+ it "redirects to the filters list" do
+ filter = Filter.create! valid_attributes
+ delete :destroy, {:id => filter.to_param}, valid_session
+ response.should redirect_to(filters_url)
+ end
+ end
+
+end
View
9 spec/factories/filters.rb
@@ -0,0 +1,9 @@
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :filter do
+ matching_regexp "MyString"
+ account_id 1
+ group_id 1
+ end
+end
View
15 spec/helpers/filters_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the FiltersHelper. For example:
+#
+# describe FiltersHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe FiltersHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
View
5 spec/models/filter_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Filter do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
View
11 spec/requests/filters_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe "Filters" do
+ describe "GET /filters" do
+ it "works! (now write some real specs)" do
+ # Run the generator again with the --webrat flag if you want to use webrat methods/matchers
+ get filters_path
+ response.status.should be(200)
+ end
+ end
+end
View
35 spec/routing/filters_routing_spec.rb
@@ -0,0 +1,35 @@
+require "spec_helper"
+
+describe FiltersController do
+ describe "routing" do
+
+ it "routes to #index" do
+ get("/filters").should route_to("filters#index")
+ end
+
+ it "routes to #new" do
+ get("/filters/new").should route_to("filters#new")
+ end
+
+ it "routes to #show" do
+ get("/filters/1").should route_to("filters#show", :id => "1")
+ end
+
+ it "routes to #edit" do
+ get("/filters/1/edit").should route_to("filters#edit", :id => "1")
+ end
+
+ it "routes to #create" do
+ post("/filters").should route_to("filters#create")
+ end
+
+ it "routes to #update" do
+ put("/filters/1").should route_to("filters#update", :id => "1")
+ end
+
+ it "routes to #destroy" do
+ delete("/filters/1").should route_to("filters#destroy", :id => "1")
+ end
+
+ end
+end
View
22 spec/views/filters/edit.html.haml_spec.rb
@@ -0,0 +1,22 @@
+require 'spec_helper'
+
+describe "filters/edit" do
+ before(:each) do
+ @filter = assign(:filter, stub_model(Filter,
+ :matching_regexp => "MyString",
+ :account_id => 1,
+ :group_id => 1
+ ))
+ end
+
+ it "renders the edit filter form" do
+ render
+
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "form", :action => filters_path(@filter), :method => "post" do
+ assert_select "input#filter_matching_regexp", :name => "filter[matching_regexp]"
+ assert_select "input#filter_account_id", :name => "filter[account_id]"
+ assert_select "input#filter_group_id", :name => "filter[group_id]"
+ end
+ end
+end
View
28 spec/views/filters/index.html.haml_spec.rb
@@ -0,0 +1,28 @@
+require 'spec_helper'
+
+describe "filters/index" do
+ before(:each) do
+ assign(:filters, [
+ stub_model(Filter,
+ :matching_regexp => "Matching Regexp",
+ :account_id => 1,
+ :group_id => 1
+ ),
+ stub_model(Filter,
+ :matching_regexp => "Matching Regexp",
+ :account_id => 1,
+ :group_id => 1
+ )
+ ])
+ end
+
+ it "renders a list of filters" do
+ render
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "tr>td", :text => "Matching Regexp".to_s, :count => 2
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "tr>td", :text => 1.to_s, :count => 2
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "tr>td", :text => 1.to_s, :count => 2
+ end
+end
View
22 spec/views/filters/new.html.haml_spec.rb
@@ -0,0 +1,22 @@
+require 'spec_helper'
+
+describe "filters/new" do
+ before(:each) do
+ assign(:filter, stub_model(Filter,
+ :matching_regexp => "MyString",
+ :account_id => 1,
+ :group_id => 1
+ ).as_new_record)
+ end
+
+ it "renders new filter form" do
+ render
+
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ assert_select "form", :action => filters_path, :method => "post" do
+ assert_select "input#filter_matching_regexp", :name => "filter[matching_regexp]"
+ assert_select "input#filter_account_id", :name => "filter[account_id]"
+ assert_select "input#filter_group_id", :name => "filter[group_id]"
+ end
+ end
+end
View
21 spec/views/filters/show.html.haml_spec.rb
@@ -0,0 +1,21 @@
+require 'spec_helper'
+
+describe "filters/show" do
+ before(:each) do
+ @filter = assign(:filter, stub_model(Filter,
+ :matching_regexp => "Matching Regexp",
+ :account_id => 1,
+ :group_id => 1
+ ))
+ end
+
+ it "renders attributes in <p>" do
+ render
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ rendered.should match(/Matching Regexp/)
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ rendered.should match(/1/)
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
+ rendered.should match(/1/)
+ end
+end

No commit comments for this range

Something went wrong with that request. Please try again.