require 'spec_helper' describe IcecastSourceChange do let(:change) { FactoryGirl.create(:icecast_source_change) } it "validates" do bad_change = IcecastSourceChange.new bad_change.save.should be_false bad_change.errors[:change_type].should == ["is not included in the list"] bad_change.errors[:source_direction].should == ["is not included in the list"] bad_change.errors[:success].should == ["is not included in the list"] bad_change.errors[:mount].should == ["can't be blank"] end it "success" do change.touch end end