From 6618b6b753b9d82ee1d6e1cf91ccedbf8fc98840 Mon Sep 17 00:00:00 2001 From: Afri <58883403+q9f@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:21:50 +0100 Subject: [PATCH] spec: move fixtures level up (#8) * examples: fix printout * spec: move fixtures level up --- bin/api | 4 ++-- examples/distance.rb | 2 +- examples/pathfinder.rb | 2 +- {spec/fixtures => fixtures}/mapping_closed_alpha.json | 0 {spec/fixtures => fixtures}/stars_closed_alpha.json | 0 {spec/fixtures => fixtures}/stars_phase5.json | 0 spec/frontier/coords_spec.rb | 2 +- spec/frontier/star_spec.rb | 6 +++--- 8 files changed, 8 insertions(+), 8 deletions(-) rename {spec/fixtures => fixtures}/mapping_closed_alpha.json (100%) rename {spec/fixtures => fixtures}/stars_closed_alpha.json (100%) rename {spec/fixtures => fixtures}/stars_phase5.json (100%) diff --git a/bin/api b/bin/api index 731219c..2d71c80 100755 --- a/bin/api +++ b/bin/api @@ -2,7 +2,7 @@ # Update available star systems from swagger API (Phase 5) -### curl https://blockchain-gateway-stillness.live.tech.evefrontier.com/solarsystems -o ./spec/fixtures/stars_phase5.json +### curl https://blockchain-gateway-stillness.live.tech.evefrontier.com/solarsystems -o ./fixtures/stars_phase5.json # Update available star systems from swagger API (Phase 6) -curl https://blockchain-gateway-nova.nursery.reitnorf.com/solarsystems -o ./spec/fixtures/stars_closed_alpha.json +curl https://blockchain-gateway-nova.nursery.reitnorf.com/solarsystems -o ./fixtures/stars_closed_alpha.json diff --git a/examples/distance.rb b/examples/distance.rb index c713722..5d0bd1e 100644 --- a/examples/distance.rb +++ b/examples/distance.rb @@ -18,7 +18,7 @@ ALL_STARS = {} # Read star data (locally or from API) - stars_closed_alpha = File.read "./spec/fixtures/stars_closed_alpha.json" + stars_closed_alpha = File.read "./fixtures/stars_closed_alpha.json" stars_closed_alpha = JSON.parse stars_closed_alpha # Create all star system objects with coordinates diff --git a/examples/pathfinder.rb b/examples/pathfinder.rb index 6ec9a73..ebdc2e9 100644 --- a/examples/pathfinder.rb +++ b/examples/pathfinder.rb @@ -31,7 +31,7 @@ UNIVERSE_GRAPH = Graph.new # Read star data (locally or from API) - stars_closed_alpha = File.read "./spec/fixtures/stars_closed_alpha.json" + stars_closed_alpha = File.read "./fixtures/stars_closed_alpha.json" stars_closed_alpha = JSON.parse stars_closed_alpha # Create all star system objects with coordinates diff --git a/spec/fixtures/mapping_closed_alpha.json b/fixtures/mapping_closed_alpha.json similarity index 100% rename from spec/fixtures/mapping_closed_alpha.json rename to fixtures/mapping_closed_alpha.json diff --git a/spec/fixtures/stars_closed_alpha.json b/fixtures/stars_closed_alpha.json similarity index 100% rename from spec/fixtures/stars_closed_alpha.json rename to fixtures/stars_closed_alpha.json diff --git a/spec/fixtures/stars_phase5.json b/fixtures/stars_phase5.json similarity index 100% rename from spec/fixtures/stars_phase5.json rename to fixtures/stars_phase5.json diff --git a/spec/frontier/coords_spec.rb b/spec/frontier/coords_spec.rb index 258b1e9..b68d17d 100644 --- a/spec/frontier/coords_spec.rb +++ b/spec/frontier/coords_spec.rb @@ -3,7 +3,7 @@ require "spec_helper" describe Coords do - let(:stars_phase5_file) { File.read "spec/fixtures/stars_phase5.json" } + let(:stars_phase5_file) { File.read "./fixtures/stars_phase5.json" } subject(:stars_phase5) { JSON.parse stars_phase5_file } it "can map basic coordinates" do diff --git a/spec/frontier/star_spec.rb b/spec/frontier/star_spec.rb index 034a95c..7deae8e 100644 --- a/spec/frontier/star_spec.rb +++ b/spec/frontier/star_spec.rb @@ -3,11 +3,11 @@ require "spec_helper" describe Star do - let(:stars_phase5_file) { File.read "spec/fixtures/stars_phase5.json" } + let(:stars_phase5_file) { File.read "./fixtures/stars_phase5.json" } subject(:stars_phase5) { JSON.parse stars_phase5_file } - let(:stars_closed_alpha_file) { File.read "spec/fixtures/stars_closed_alpha.json" } + let(:stars_closed_alpha_file) { File.read "./fixtures/stars_closed_alpha.json" } subject(:stars_closed_alpha) { JSON.parse stars_closed_alpha_file } - let(:mapping_closed_alpha_file) { File.read "spec/fixtures/mapping_closed_alpha.json" } + let(:mapping_closed_alpha_file) { File.read "./fixtures/mapping_closed_alpha.json" } subject(:mapping_closed_alpha) { JSON.parse mapping_closed_alpha_file } it "can create a generic star system" do