# Installation

Add `gem 'hyper-spec'` to your Gemfile in the usual way.\
Typically in a Rails app you will add this in the test section of your Gemfile:

```ruby
group :test do
  gem 'hyper-spec', '~> 1.0.alpha1.0'
end
```

Make sure to `bundle install`.

HyperSpec is integrated with the `pry` gem for debugging, so it is recommended to add the `pry` gem as well.

HyperSpec will also use the `timecop` gem if present to allow you to control and synchronize time on the server and the client.

A typical spec\_helper file when using HyperSpec will look like this:

```ruby
# spec_helper.rb
require 'hyper-spec'
require 'pry'  # optional

ENV["RAILS_ENV"] ||= 'test'
require File.expand_path('../test_app/config/environment', __FILE__)

require 'rspec/rails'
require 'timecop' # optional

# any other rspec configuration you need
# note HyperSpec will include chrome driver for providing the client
# run time environment
```

To load the webdriver and client environment your spec should have the `:js` flag set:

```ruby
# the js flag can be set on the entire group of specs, or a context
describe 'some hyper-specs', :js do
  ...
end

# or for an individual spec
  it 'an individual hyper-spec', :js do
    ...
  end
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyperstack.org/development-workflow/hyper-spec/01-installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
