Sha256: e951a21f14f6b45698ec161273b209af7346be8b2d2d67668471e5f0ba15c2f3

Contents?: true

Size: 834 Bytes

Versions: 2

Compression:

Stored size: 834 Bytes

Contents

require 'spec_helper'
require 'catlogic'
require 'pry'

describe 'term object' do
  it 'can return term as string' do
    term = Term.new('dogs')
    result = term.label
    result.should == 'dogs'
  end

  it 'can return term opposite as string' do
    term = Term.new('dogs')
    opposite = term.opposite
    result = opposite.label
    result.should == 'non-dogs'
  end

  it 'can return correct distribution for subject term' do
    term = Term.new('dogs')
    quantity = Quantity.new('universal')
    result = term.distribution_subject(quantity)
    result.label.should == 'distributed'
  end

  it 'can return correct distribution for predicate term' do
    term = Term.new('dogs')
    quality = Quality.new('affirmative')
    result = term.distribution_predicate(quality)
    result.label.should == 'undistributed'
  end



end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
catlogic-0.0.2 spec/term_spec.rb
catlogic-0.0.1 spec/term_spec.rb