Sha256: 9c826ef436abab2ca4d6f8c233681a4c83f032411e496ec2416a9d8b8fc5fecb
Contents?: true
Size: 790 Bytes
Versions: 18
Compression:
Stored size: 790 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Muck::HelperController do render_views describe "load_states_for_country" do before(:all) do @country = Factory(:country) @state = Factory(:state, :country => @country) @canada = Factory(:country, :abbreviation => 'CA') @us = Factory(:country, :abbreviation => 'US') @other_country = Factory(:country) end it "should load" do get_load_states_for_country should respond_with :success end it "should include state in resulting json" do get_load_states_for_country @response.body.should include(@state.name) end end def get_load_states_for_country get :load_states_for_country, :id => @country.to_param, :format => 'json' end end
Version data entries
18 entries across 18 versions & 1 rubygems