# encoding: utf-8

require 'spec_helper'

describe Response::Exception::Output, 'equalizer behavior' do
  subject { object == other }

  let(:object)    { described_class.new(data, exception) }
  let(:data)      { double }
  let(:exception) { RuntimeError.new }

  let(:other)     { described_class.new(other_data, other_exception) }

  context 'with equal data associated' do

    let(:other_data) { data }

    context 'and equal exception classes' do
      let(:other_exception) { RuntimeError.new }

      it { should be(true) }
    end

    context 'and different exception classes' do
      let(:other_exception) { StandardError.new }

      it { should be(false) }
    end
  end

  context 'with different data associated' do
    let(:other_data) { double }

    context 'and equal exception classes' do
      let(:other_exception) { RuntimeError.new }

      it { should be(false) }
    end

    context 'and different exception classes' do
      let(:other_exception) { StandardError.new }

      it { should be(false) }
    end
  end
end

# encoding: utf-8

require 'spec_helper'

describe Response::Exception::Output do
  subject { object == other }

  let(:object)    { described_class.new(data, exception) }
  let(:data)      { double }
  let(:exception) { RuntimeError.new }

  let(:other)     { described_class.new(other_data, other_exception) }

  context 'with equal data associated' do

    let(:other_data) { data }

    context 'and equal exception classes' do
      let(:other_exception) { RuntimeError.new }

      it { should be(true) }
    end

    context 'and different exception classes' do
      let(:other_exception) { StandardError.new }

      it { should be(false) }
    end
  end

  context 'with different data associated' do
    let(:other_data) { double }

    context 'and equal exception classes' do
      let(:other_exception) { RuntimeError.new }

      it { should be(false) }
    end

    context 'and different exception classes' do
      let(:other_exception) { StandardError.new }

      it { should be(false) }
    end
  end
end

Make Response::Exception::Output work with mutant
Make Response::Exception::Output work with mutant
