Sha256: cbd0d010c83c494ec618b4f94b93f5b17f20574840e9f220c967348a591f6172

Contents?: true

Size: 606 Bytes

Versions: 1

Compression:

Stored size: 606 Bytes

Contents

require "spec_helper"

shared_examples_for 'a selector' do
  let(:selector) { described_class.new }
  let(:data) { FactoryGirl.build(:data) }

  it "should return a FeatureVector object" do
    selector.generate_vector(data).should be_a(FeatureVector)
  end
  it "should create and array with 0 and 1's" do
    vector = selector.generate_vector(data)
    vector.data.each do |e|
      [0,1].should include(e)
    end
  end
  it "should be able to process multiple data entries at once" do
    selector.generate_vectors([data]).each do |e|
      e.should == selector.generate_vector(data)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
svm_helper-0.1.0 spec/support/selector_spec.rb