File tree Expand file tree Collapse file tree 6 files changed +34
-8
lines changed
Expand file tree Collapse file tree 6 files changed +34
-8
lines changed Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ All notable changes to this project will be documented in this file.
4+
5+ The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6+ and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7+
8+ ## [ Unreleased]
9+
10+ ### Added
11+
12+ - Adds interface for building objects with Replicator
Original file line number Diff line number Diff line change 88crystal : 1.6.2
99
1010license : MIT
11+
12+ development_dependencies :
13+ spectator :
14+ gitlab : arctic-fox/spectator
15+ version : = 0.10.6
Original file line number Diff line number Diff line change 11require " ./spec_helper"
22
3- describe Replicator do
4- # TODO: Write tests
3+ class Galaxy ; extend Replicator ::Replicable ; end
54
6- it " works" do
7- true .should eq(true )
5+ Spectator .describe Replicator do
6+ describe " .build" do
7+ it " returns an empty array when an unregistered class is provided" do
8+ replicas = Galaxy .build(:iks_buruk )
9+ expect(replicas.size).to eq(0 )
10+ end
811 end
912end
Original file line number Diff line number Diff line change 1- require " spec "
1+ require " spectator "
22require " ../src/replicator"
Original file line number Diff line number Diff line change 1- # TODO: Write documentation for `Replicator`
1+ require " ./replicator/replicable"
2+
23module Replicator
34 VERSION = " 0.1.0"
4-
5- # TODO: Put your code here
65end
Original file line number Diff line number Diff line change 1+ module Replicator
2+ module Replicable
3+ def build (key )
4+ Array (String ).new
5+ end
6+ end
7+ end
You can’t perform that action at this time.
0 commit comments