Sha256: 996ead874884421e74c6f6750dea17ecc44176b7118ffb27f05c0c0c5d7bc34f

Contents?: true

Size: 702 Bytes

Versions: 10

Compression:

Stored size: 702 Bytes

Contents

require 'spec_helper'

describe CASino::Listener::LegacyValidator do
  let(:controller) { Object.new }
  let(:listener) { described_class.new(controller) }
  let(:text) { "foobar\nbla\n" }
  let(:render_parameters) { { text: text, content_type: 'text/plain' } }

  describe '#validation_succeeded' do
    it 'tells the controller to render the response text' do
      controller.should_receive(:render).with(render_parameters)
      listener.validation_succeeded(text)
    end
  end

  describe '#validation_failed' do
    it 'tells the controller to render the response text' do
      controller.should_receive(:render).with(render_parameters)
      listener.validation_failed(text)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
casino-1.3.0 spec/controllers/listener/legacy_validator_spec.rb
casino-1.2.2 spec/controllers/listener/legacy_validator_spec.rb
casino-1.2.1 spec/controllers/listener/legacy_validator_spec.rb
casino-1.2.0 spec/controllers/listener/legacy_validator_spec.rb
casino-1.1.0 spec/controllers/listener/legacy_validator_spec.rb
casino-1.0.0 spec/controllers/listener/legacy_validator_spec.rb
casino-0.0.4 spec/controllers/listener/legacy_validator_spec.rb
casino-0.0.3 spec/controllers/listener/legacy_validator_spec.rb
casino-0.0.2 spec/controllers/listener/legacy_validator_spec.rb
casino-0.0.1 spec/controllers/listener/legacy_validator_spec.rb