Skip to content

Instantly share code, notes, and snippets.

@carolyncole
Created May 1, 2012 19:06
Show Gist options
  • Save carolyncole/2570560 to your computer and use it in GitHub Desktop.
Save carolyncole/2570560 to your computer and use it in GitHub Desktop.
rspec error
Failure/Error: @f.audit!
Mocha::ExpectationError:
unexpected invocation: ChecksumAuditLog(id: integer, pid: string, dsid: string, version: string, pass: boolean, expected_result: string, actual_result: string, created_at: datetime, updated_at: datetime).create!(:pass => true, :pid => 'scholarsphere:05741r680', :dsid => 'DC', :version => 'DC1.0')
unsatisfied expectations:
- expected exactly once, not yet invoked: #<AnyInstance:FileContentDatastream>.dsChecksumValid(any_parameters)
- expected exactly once, not yet invoked: #<AnyInstance:FitsDatastream>.dsChecksumValid(any_parameters)
expected exactly once, not yet invoked: #<AnyInstance:ActiveFedora::RelsExtDatastream>.dsChecksumValid(any_parameters)
- expected exactly once, not yet invoked: ChecksumAuditLog(id: integer, pid: string, dsid: string, version: string, pass: boolean, expected_result: string, actual_result: string, created_at: datetime, updated_at: datetime).create!(:pass => false, :pid => 'scholarsphere:05741r680', :version => 'RELS-EXT.0', :dsid => 'RELS-EXT')
- expected exactly once, not yet invoked: ChecksumAuditLog(id: integer, pid: string, dsid: string, version: string, pass: boolean, expected_result: string, actual_result: string, created_at: datetime, updated_at: datetime).create!(:pass => false, :pid => 'scholarsphere:05741r680', :version => 'characterization.0', :dsid => 'characterization')
- expected exactly once, not yet invoked: ChecksumAuditLog(id: integer, pid: string, dsid: string, version: string, pass: boolean, expected_result: string, actual_result: string, created_at: datetime, updated_at: datetime).create!(:pass => false, :pid => 'scholarsphere:05741r680', :version => 'content.0', :dsid => 'content')
# ./app/models/generic_file.rb:225:in `audit'
# ./app/models/generic_file.rb:194:in `block in audit'
# ./app/models/generic_file.rb:202:in `call'
# ./app/models/generic_file.rb:202:in `block (2 levels) in per_version'
# ./app/models/generic_file.rb:201:in `each'
# ./app/models/generic_file.rb:201:in `block in per_version'
# ./app/models/generic_file.rb:200:in `each'
# ./app/models/generic_file.rb:200:in `per_version'
# ./app/models/generic_file.rb:193:in `audit'
# ./app/models/generic_file.rb:175:in `audit!'
# ./spec/models/generic_file_spec.rb:139:in `block (3 levels) in <top (required)>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment